import Vue from 'vue' // 引入Vue
import VueRouter from 'vue-router' // 引入VueRouter插件
import HomeView from '@/views/HomeView'
import HomeIndex from '@/components/HomeIndex'
Vue.use(VueRouter) // 初始化VueRouter插件

// 定义路由规则数组
const routes = [
    {
        path: '/home', component: HomeView
    },
    {
        path: '/homeIndex', component: HomeIndex
    }
]

// 创建路由对象
const router = new VueRouter({
    // 路由规则
    routes
})

// 导出定义好的路由规则
export default router


